//
//  main.swift
//  fit
//
//  Created by Archer on 2018/10/19.
//  Copyright © 2018年 Archer. All rights reserved.
//

import Foundation

do {
    let arguments = ["fit", "/Users/kokuto/bin/1.txt", "-t", "ObjC", "-o", "JSONModel", "-f" , "YYModel", "-s", "Resp", "-p", "JSON", "-i", "no", "-u", "no", "-c", "yes"] // CommandLine.arguments
    let fate = try Fate(arguments)
    let ctx = Context(fate)
    try ctx.generate()
} catch let error as GenerationError {
    print("-fit: " + error.description)
} catch {
    print("-fit: \(error)")
}

// file was created means there is no error occurred, so we can mark as try!
print("-fit: Please check newer created file at \"\(try! NSFileWritingDirectory())\".")
